From c50916d27be3dd19c97dccdb02b259397e13852c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 29 Sep 2020 17:55:01 +0100 Subject: [PATCH] a11y: Add the AT-SPI DBus descriptions And generate the code for the DBus interfaces. We don't want the full object manager experience, here, because we're going to have a single object responding to various interfaces and remote method calls. For this reason, we're not using the gnome module in Meson to call gdbus-codegen for us: we need to use the interface info command line arguments, and those are not available from Meson. --- gtk/a11y/atspi/Accessibility.xml | 22 +++ gtk/a11y/atspi/Accessible.xml | 67 ++++++++ gtk/a11y/atspi/Action.xml | 38 +++++ gtk/a11y/atspi/Application.xml | 26 +++ gtk/a11y/atspi/Cache.xml | 21 +++ gtk/a11y/atspi/Collection.xml | 48 ++++++ gtk/a11y/atspi/Component.xml | 86 ++++++++++ gtk/a11y/atspi/DeviceEventController.xml | 64 ++++++++ gtk/a11y/atspi/DeviceEventListener.xml | 12 ++ gtk/a11y/atspi/Document.xml | 24 +++ gtk/a11y/atspi/EditableText.xml | 40 +++++ gtk/a11y/atspi/Event.xml | 193 +++++++++++++++++++++++ gtk/a11y/atspi/Hyperlink.xml | 27 ++++ gtk/a11y/atspi/Hypertext.xml | 21 +++ gtk/a11y/atspi/Image.xml | 27 ++++ gtk/a11y/atspi/Registry.xml | 30 ++++ gtk/a11y/atspi/Selection.xml | 42 +++++ gtk/a11y/atspi/Socket.xml | 27 ++++ gtk/a11y/atspi/Table.xml | 135 ++++++++++++++++ gtk/a11y/atspi/TableCell.xml | 22 +++ gtk/a11y/atspi/Text.xml | 170 ++++++++++++++++++++ gtk/a11y/atspi/Value.xml | 14 ++ gtk/a11y/atspi/meson.build | 65 ++++++++ gtk/a11y/meson.build | 10 ++ gtk/meson.build | 2 + 25 files changed, 1233 insertions(+) create mode 100644 gtk/a11y/atspi/Accessibility.xml create mode 100644 gtk/a11y/atspi/Accessible.xml create mode 100644 gtk/a11y/atspi/Action.xml create mode 100644 gtk/a11y/atspi/Application.xml create mode 100644 gtk/a11y/atspi/Cache.xml create mode 100644 gtk/a11y/atspi/Collection.xml create mode 100644 gtk/a11y/atspi/Component.xml create mode 100644 gtk/a11y/atspi/DeviceEventController.xml create mode 100644 gtk/a11y/atspi/DeviceEventListener.xml create mode 100644 gtk/a11y/atspi/Document.xml create mode 100644 gtk/a11y/atspi/EditableText.xml create mode 100644 gtk/a11y/atspi/Event.xml create mode 100644 gtk/a11y/atspi/Hyperlink.xml create mode 100644 gtk/a11y/atspi/Hypertext.xml create mode 100644 gtk/a11y/atspi/Image.xml create mode 100644 gtk/a11y/atspi/Registry.xml create mode 100644 gtk/a11y/atspi/Selection.xml create mode 100644 gtk/a11y/atspi/Socket.xml create mode 100644 gtk/a11y/atspi/Table.xml create mode 100644 gtk/a11y/atspi/TableCell.xml create mode 100644 gtk/a11y/atspi/Text.xml create mode 100644 gtk/a11y/atspi/Value.xml create mode 100644 gtk/a11y/atspi/meson.build create mode 100644 gtk/a11y/meson.build diff --git a/gtk/a11y/atspi/Accessibility.xml b/gtk/a11y/atspi/Accessibility.xml new file mode 100644 index 0000000000..a454aeb55b --- /dev/null +++ b/gtk/a11y/atspi/Accessibility.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Accessible.xml b/gtk/a11y/atspi/Accessible.xml new file mode 100644 index 0000000000..7015466060 --- /dev/null +++ b/gtk/a11y/atspi/Accessible.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Action.xml b/gtk/a11y/atspi/Action.xml new file mode 100644 index 0000000000..0f5aa850bd --- /dev/null +++ b/gtk/a11y/atspi/Action.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Application.xml b/gtk/a11y/atspi/Application.xml new file mode 100644 index 0000000000..2191f08858 --- /dev/null +++ b/gtk/a11y/atspi/Application.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Cache.xml b/gtk/a11y/atspi/Cache.xml new file mode 100644 index 0000000000..e693b54cdb --- /dev/null +++ b/gtk/a11y/atspi/Cache.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Collection.xml b/gtk/a11y/atspi/Collection.xml new file mode 100644 index 0000000000..7b39776a0a --- /dev/null +++ b/gtk/a11y/atspi/Collection.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Component.xml b/gtk/a11y/atspi/Component.xml new file mode 100644 index 0000000000..c1258d27c6 --- /dev/null +++ b/gtk/a11y/atspi/Component.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/DeviceEventController.xml b/gtk/a11y/atspi/DeviceEventController.xml new file mode 100644 index 0000000000..0af9aac27f --- /dev/null +++ b/gtk/a11y/atspi/DeviceEventController.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/DeviceEventListener.xml b/gtk/a11y/atspi/DeviceEventListener.xml new file mode 100644 index 0000000000..a6dd3b60c8 --- /dev/null +++ b/gtk/a11y/atspi/DeviceEventListener.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Document.xml b/gtk/a11y/atspi/Document.xml new file mode 100644 index 0000000000..d12a3060ca --- /dev/null +++ b/gtk/a11y/atspi/Document.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/EditableText.xml b/gtk/a11y/atspi/EditableText.xml new file mode 100644 index 0000000000..09f62f5aa7 --- /dev/null +++ b/gtk/a11y/atspi/EditableText.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Event.xml b/gtk/a11y/atspi/Event.xml new file mode 100644 index 0000000000..fac67deb05 --- /dev/null +++ b/gtk/a11y/atspi/Event.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Hyperlink.xml b/gtk/a11y/atspi/Hyperlink.xml new file mode 100644 index 0000000000..75f809931f --- /dev/null +++ b/gtk/a11y/atspi/Hyperlink.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Hypertext.xml b/gtk/a11y/atspi/Hypertext.xml new file mode 100644 index 0000000000..18a3b342a8 --- /dev/null +++ b/gtk/a11y/atspi/Hypertext.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Image.xml b/gtk/a11y/atspi/Image.xml new file mode 100644 index 0000000000..43536ee956 --- /dev/null +++ b/gtk/a11y/atspi/Image.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Registry.xml b/gtk/a11y/atspi/Registry.xml new file mode 100644 index 0000000000..a3ab93c3c2 --- /dev/null +++ b/gtk/a11y/atspi/Registry.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Selection.xml b/gtk/a11y/atspi/Selection.xml new file mode 100644 index 0000000000..2e1918757a --- /dev/null +++ b/gtk/a11y/atspi/Selection.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Socket.xml b/gtk/a11y/atspi/Socket.xml new file mode 100644 index 0000000000..8da9948833 --- /dev/null +++ b/gtk/a11y/atspi/Socket.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Table.xml b/gtk/a11y/atspi/Table.xml new file mode 100644 index 0000000000..181acaa6af --- /dev/null +++ b/gtk/a11y/atspi/Table.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/TableCell.xml b/gtk/a11y/atspi/TableCell.xml new file mode 100644 index 0000000000..c60a074fd4 --- /dev/null +++ b/gtk/a11y/atspi/TableCell.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Text.xml b/gtk/a11y/atspi/Text.xml new file mode 100644 index 0000000000..313131e6f8 --- /dev/null +++ b/gtk/a11y/atspi/Text.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/Value.xml b/gtk/a11y/atspi/Value.xml new file mode 100644 index 0000000000..ccd6c7aa59 --- /dev/null +++ b/gtk/a11y/atspi/Value.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/gtk/a11y/atspi/meson.build b/gtk/a11y/atspi/meson.build new file mode 100644 index 0000000000..05be90c2e7 --- /dev/null +++ b/gtk/a11y/atspi/meson.build @@ -0,0 +1,65 @@ +atspi_xml = [ + 'Accessible.xml', + 'Action.xml', + 'Application.xml', + 'Cache.xml', + 'Collection.xml', + 'Component.xml', + 'DeviceEventController.xml', + 'DeviceEventListener.xml', + 'Document.xml', + 'EditableText.xml', + 'Event.xml', + 'Hyperlink.xml', + 'Hypertext.xml', + 'Image.xml', + 'Registry.xml', + 'Selection.xml', + 'Socket.xml', + 'Table.xml', + 'TableCell.xml', + 'Text.xml', + 'Value.xml', +] + +gdbus_codegen = find_program('gdbus-codegen') +atspi_src = [] +foreach xml: atspi_xml + obj_name = xml.split('.').get(0) + + # We cannot use gnome.gdbus_codegen() directly because we only care about + # the interface definitions, not the whole GTypeInterface/GObject proxy + # classes + gen_hdr = custom_target('atspi-' + obj_name.to_lower() + '-hdr', + input: xml, + output: 'atspi-' + obj_name.to_lower() + '.h', + command: [ + gdbus_codegen, + '--interface-prefix=org.a11y.atspi', + '--c-namespace=Atspi', + '--pragma-once', + '--interface-info-header', + '--output=@OUTPUT@', + '@INPUT@', + ], + build_by_default: true, + ) + + gen_src = custom_target('atspi-' + obj_name.to_lower() + '-src', + input: xml, + output: 'atspi-' + obj_name.to_lower() + '.c', + command: [ + gdbus_codegen, + '--interface-prefix=org.a11y.atspi', + '--c-namespace=Atspi', + '--interface-info-body', + '--output=@OUTPUT@', + '@INPUT@', + ], + build_by_default: true, + ) + + atspi_src += [gen_src, gen_hdr] +endforeach + +gtk_a11y_src += atspi_src diff --git a/gtk/a11y/meson.build b/gtk/a11y/meson.build new file mode 100644 index 0000000000..b3555eff27 --- /dev/null +++ b/gtk/a11y/meson.build @@ -0,0 +1,10 @@ +gtk_a11y_src = [] +gtk_a11y_backends = [] + +if os_unix + gtk_a11y_backends += 'atspi' +endif + +if gtk_a11y_backends.contains('atspi') + subdir('atspi') +endif diff --git a/gtk/meson.build b/gtk/meson.build index 006ac8f31e..614b4079f8 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -1,3 +1,4 @@ +subdir('a11y') subdir('deprecated') subdir('inspector') @@ -961,6 +962,7 @@ gtk_gen_headers = [ ] gtk_sources += [ + gtk_a11y_src, gtk_dbus_src, gtk_deprecated_sources, inspector_sources, -- 2.30.2